# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sofia-sip
pkgver=1.13.8
pkgrel=0
pkgdesc="RFC3261 compliant SIP User-Agent library"
url="https://github.com/freeswitch/sofia-sip"
arch="all"
license="LGPL-2.1-only"
options="!check" #tests are broken
makedepends="automake autoconf libtool m4
glib-dev openssl1.1-compat-dev lksctp-tools-dev"
checkdepends="check-dev"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/freeswitch/sofia-sip/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	sh autogen.sh
}

build() {
	./configure \
		--prefix=/usr \
		--with-openssl \
		--enable-sctp \
		--enable-static=no \
		--disable-rpath
	make
}

check() {
	TPORT_DEBUG=9 TPORT_TEST_HOST=0.0.0.0 make check
}

package() {
	make DESTDIR="$pkgdir" install
}

doc() {
	default_doc
	make doxygen
}
sha512sums="
f857eb9cf25d3306476bc6d0bda786385529021d498cf0c2c779cdbae31295af4ed59a67fb0c882b09bac738623d273a94ebbda360c7a2b3d7da140852ccc6fa  sofia-sip-1.13.8.tar.gz
"
